package ink.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-05-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("logistics")
@NoArgsConstructor
public class Logistics implements Serializable {

    private static final long serialVersionUID = 1L;

    public Logistics(String monthlyOrderId, String imagesUri, BigDecimal sendCost, BigDecimal incomeCost) {
        this.monthlyOrderId = monthlyOrderId;
        this.imagesUri = imagesUri;
        this.sendCost = sendCost;
        this.incomeCost = incomeCost;
    }

    public Logistics(String monthlyOrderId, String name, String phone, String address) {
        this.monthlyOrderId = monthlyOrderId;
        this.name = name;
        this.phone = phone;
        this.address = address;
    }

    /**
     * 物流表自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 包月订单id
     */
    @TableField("monthly_order_id")
    private String monthlyOrderId;

    /**
     * 物流号码
     */
    @TableField("number")
    private String number;

    /**
     * 过去费用的图片凭证
     */
    @TableField("images_uri")
    private String imagesUri;

    /**
     * 回来费用的图片凭证
     */
    @TableField("images_uri2")
    private String imagesUri2;

    /**
     * 发送费用
     */
    @TableField("send_cost")
    private BigDecimal sendCost;

    /**
     * 回收费用
     */
    @TableField("income_cost")
    private BigDecimal incomeCost;

    /**
     * 客户姓名
     */
    @TableField("name")
    private String name;

    /**
     * 客户手机号
     */
    @TableField("phone")
    private String phone;

    /**
     * 客户地址
     */
    @TableField("address")
    private String address;

    /**
     * 是否已经发货
     */
    @TableField("send")
    private Boolean send;

    /**
     * 货物的状态:
     * 未退回 已退回 忽略
     */
    @TableField("back_status")
    private String backStatus;

    /**
     * 备份字段(现在是机器型号)
     */
    @TableField("remarks")
    private String remarks;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


}
